#include "StdAfx.h"
#include "TargetControlLogic.h"
#include "TargetController.h"

TargetControlLogic::TargetControlLogic(Ogre::Real maxForce, Ogre::Real maxTorque)
{
	this->maxForce = maxForce;
	this->maxTorque = maxTorque;
}


TargetControlLogic::~TargetControlLogic(void)
{
	std::vector<Target*>::iterator i = targets.begin();
	while(i != targets.end())
	{
		delete *i;
		i++;
	}
}

void TargetControlLogic::addTarget(Target* target)
{
	targets.push_back(target);
}

void TargetControlLogic::addProjectileTarget(Target* target)
{
	ProjectileTargets.push_back(target);
}

Controller* TargetControlLogic::makeController()
{
	return new TargetController(this);
}

void TargetControlLogic::addLauncher(Launcher* launcher)
{
	launchers.push_back(launcher);
}